package com.thomsonreuters.ce.edps.model.impl;

import java.io.Serializable;
import java.math.BigDecimal;
import org.apache.commons.lang.builder.ToStringBuilder;

import com.thomsonreuters.ce.edps.model.IUnderlyingProduct;
import com.thomsonreuters.ce.edps.model.IUnderlyingProductRship;


/** @author Hibernate CodeGenerator */
public class UnderlyingProductRship implements Serializable, IUnderlyingProductRship {

    /** identifier field */
    private BigDecimal id;

    /** persistent field */
    private IUnderlyingProduct underlyingProductByUprParentId;

    /** persistent field */
    private IUnderlyingProduct underlyingProductByUprChildId;

    /** full constructor */
    public UnderlyingProductRship(BigDecimal id, IUnderlyingProduct underlyingProductByUprParentId, IUnderlyingProduct underlyingProductByUprChildId) {
        this.id = id;
        this.underlyingProductByUprParentId = underlyingProductByUprParentId;
        this.underlyingProductByUprChildId = underlyingProductByUprChildId;
    }

    /** default constructor */
    public UnderlyingProductRship() {
    }

    /* (non-Javadoc)
	 * @see com.thomsonreuters.ce.edps.model.impl.IUnderlyingProductRship#getId()
	 */
    @Override
	public BigDecimal getId() {
        return this.id;
    }

    /* (non-Javadoc)
	 * @see com.thomsonreuters.ce.edps.model.impl.IUnderlyingProductRship#setId(java.math.BigDecimal)
	 */
    @Override
	public void setId(BigDecimal id) {
        this.id = id;
    }

    /* (non-Javadoc)
	 * @see com.thomsonreuters.ce.edps.model.impl.IUnderlyingProductRship#getUnderlyingProductByUprParentId()
	 */
    @Override
	public IUnderlyingProduct getUnderlyingProductByUprParentId() {
        return this.underlyingProductByUprParentId;
    }

    /* (non-Javadoc)
	 * @see com.thomsonreuters.ce.edps.model.impl.IUnderlyingProductRship#setUnderlyingProductByUprParentId(com.thomsonreuters.ce.edps.model.impl.IUnderlyingProduct)
	 */
    @Override
	public void setUnderlyingProductByUprParentId(IUnderlyingProduct underlyingProductByUprParentId) {
        this.underlyingProductByUprParentId = underlyingProductByUprParentId;
    }

    /* (non-Javadoc)
	 * @see com.thomsonreuters.ce.edps.model.impl.IUnderlyingProductRship#getUnderlyingProductByUprChildId()
	 */
    @Override
	public IUnderlyingProduct getUnderlyingProductByUprChildId() {
        return this.underlyingProductByUprChildId;
    }

    /* (non-Javadoc)
	 * @see com.thomsonreuters.ce.edps.model.impl.IUnderlyingProductRship#setUnderlyingProductByUprChildId(com.thomsonreuters.ce.edps.model.impl.IUnderlyingProduct)
	 */
    @Override
	public void setUnderlyingProductByUprChildId(IUnderlyingProduct underlyingProductByUprChildId) {
        this.underlyingProductByUprChildId = underlyingProductByUprChildId;
    }

    /* (non-Javadoc)
	 * @see com.thomsonreuters.ce.edps.model.impl.IUnderlyingProductRship#toString()
	 */
    @Override
	public String toString() {
        return new ToStringBuilder(this)
            .append("id", getId())
            .toString();
    }

}
